import sun.management.ThreadInfoCompositeData;

public class ExampleClass {
    // 常量池中的内容
    private final static String CONSTANT_STRING = "Hello, World!";

    // 方法区中静态变量
    private static int counter = 0;

    // 类型信息和方法代码
    public static void increment() {
        // 局部变量
        int localCounter = 0;
        while (localCounter < 1000) {
            localCounter++;
        }

        counter++;
    }

    public static void test(){

        System.out.println("test");
    }

    public static void main(String[] args) throws InterruptedException {
        ExampleClass.increment();
        ExampleClass.test();
        System.out.println(CONSTANT_STRING);
        Thread.sleep(20000);
    }
}